package com.code.splider.controller;

import java.io.IOException;

import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class TestEX {
	
	private static String url = "http://www.dszuqiu.com/data/all";

	public static void main(String[] args) {
		
		Connection conn = Jsoup.connect(url);
		try {
			Elements el= null;
			Document doc = conn.get();
			el = doc.getElementsByAttributeValue("class", "row");
		   for (Element element : el) {
			   Elements  strong =  element.getElementsByAttributeValue("class","small-1 columns text-right");
			   if(!strong.isEmpty()){
				   //String str2 = element.
				  // System.out.println(str2);  
			   }
			   Elements  columns = element.getElementsByAttributeValue("class", "inline-list");
			   if(!columns.isEmpty()){
				   Elements  as =  element.getElementsByTag("a");
				   for (Element element2 : as) {
					   System.out.println(element2.html());
				   }
			   }
			// System.out.println(element);	
		   }
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
